ci: push images via ecr-push helper instead of docker push - #675
Merged
Conversation
The github-actions-ecr-push role's ECR push permissions are ABAC-gated on a Repository=<github repo> resource tag. Plain docker push fails against prd/wallet-backend (repo exists, tag missing) and prd/cnpg-timescaledb (repo missing) with ecr:InitiateLayerUpload denials. The ecr-push wrapper installed by stellar/actions/sdf-ecr-login creates missing dev/stg/prd repos, stamps the Repository tag, and then pushes.
Contributor
There was a problem hiding this comment.
Pull request overview
Replaces direct Docker pushes with the ECR-aware helper installed by sdf-ecr-login.
Changes:
- Uses
ecr-pushfor wallet-backend images. - Uses
ecr-pushfor CNPG TimescaleDB images.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.github/workflows/build.yml |
Pushes application images through ecr-push. |
.github/workflows/build-cnpg-timescaledb.yml |
Pushes database images through ecr-push. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
aristidesstaffieri
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Switches the push step in
build.ymlandbuild-cnpg-timescaledb.ymlfrom plaindocker pushto theecr-pushhelper thatstellar/actions/sdf-ecr-login@maininstalls ontoPATH.Why
The prd dispatches added in #674 fail at the push step:
(same for
prd/cnpg-timescaledb— runs 30826813834, 30826834157).The
github-actions-ecr-pushrole's push permissions are gated on the target ECR repository carrying aRepository=<github org/repo>resource tag.ecr-pushhandles exactly that before pushing: it creates a missing repo (only underdev/,stg/,prd/) with the tag, or adds the tag to an existing repo that lacks it.prd/wallet-backendexists without the tag;prd/cnpg-timescaledbdoesn't exist yet — the first run self-heals both, which also removes the "createprd/cnpg-timescaledbin ECR first" prerequisite noted in #674.This is the same pattern gesserit uses: build-and-push.yml.
Notes
publish-prerelease.ymlstill pushes to stg viamake docker-push; that path works today (stg repos already carry the tag). Can be switched toecr-pushas a consistency follow-up.promote-release.ymlretags toprd/wallet-backendviadocker buildx imagetools create; once the firstecr-pushrun stamps theRepositorytag on that repo, its access is covered too.